﻿using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsApplication1
{
    public partial class BMSmainPage : Form
    {
        public BMSmainPage()
        {
            InitializeComponent();
        }

        private void BMSmainPage_Load(object sender, EventArgs e)
        {

            this.Width = Screen.PrimaryScreen.Bounds.Width;
            this.Height = Screen.PrimaryScreen.Bounds.Height-35;
            AddChart2Data();
        }
        void AddChart2Data()
        {
            double Value1 = 50.0, Value2 = 10, Value3 = 34.0, Value4 = 20;
            Random random = new Random();
            for (int pointIndex = 0; pointIndex < 10; pointIndex++)
            {
                Value1 = Value1 + (random.NextDouble() * 10.0 - 5.0);
                Value2 = Value2 + (random.NextDouble() * 5.0 - 2.0);
                Value3 = Value3 + (random.NextDouble() * 13.0 - 1.0);
                chart2.Series["Series1"].Points.AddY(Value1);
                chart2.Series["Series2"].Points.AddY(Value2);
                chart2.Series["Series3"].Points.AddY(Value3);
                chart2.Series["Series4"].Points.AddY(Value4);
            }
        }

        private void label3_Click(object sender, EventArgs e)
        {
            AddChart2Data();
        }
    }
}
